var t = getApp();

Page({
    data: {
        tapin: !0
    },
    onLoad: function(t) {},
    inptext: function(t) {
        var n = t.detail.value;
        this.setData({
            equipment_no: n
        });
    },
    bindtap: function() {
        if (this.data.tapin) {
            this.setData({
                tapin: !1
            });
            var n = t.getNetAddresss("plugin.energy-cabin.frontend.dealer-terminal.add-equipment"), e = this, a = {
                equipment_no: e.data.equipment_no
            };
            t._getNetWork({
                url: n,
                data: a,
                success: function(t) {
                    var n = t.data;
                    1 == n.result ? (console.log(n), e.setData({
                        tapin: !0
                    }), wx.showToast({
                        title: n.msg,
                        icon: "none",
                        duration: 1e3,
                        success: function() {
                            setTimeout(function() {
                                wx.navigateBack({
                                    delta: 1
                                });
                            }, 1500);
                        }
                    })) : (console.log("已经点过了"), e.setData({
                        tapin: !0
                    }), wx.showToast({
                        title: n.msg,
                        icon: "none",
                        duration: 1e3,
                        success: function() {
                            setTimeout(function() {
                                wx.navigateBack({
                                    delta: 1
                                });
                            }, 1500);
                        }
                    }));
                },
                fail: function(t) {
                    console.log(t), e.setData({
                        tapin: !0
                    });
                }
            });
        }
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});